package com.xsd.vistor;

/**
 * @Description: 访问者模式
 * @Author: zhoufuzong
 * @Created: 2021-03-06 17:53:06
 * @Version: 1.1.0
 */

public class Client {
    public static void main(String[] args) {
        // 创建objectStructure
        ObjectStucture objectStucture = new ObjectStucture();
        objectStucture.attach(new Man());
        objectStucture.attach(new Woman());


        // 成功
        System.out.println("*** 成功****");
        Success success = new Success();
        objectStucture.display(success);
        System.out.println("***** 失败****");
        objectStucture.display(new Fail());
        System.out.println("*** 待定****");
        objectStucture.display(new Wait());

    }
}
